package polimi.sc.expoquest.storage.model;

/**
 * This class represents an user that can be authenticated in the application
 * @author Monica Lozano
 */
public class User {
	
	//----------------
	//ATTRIBUTES
	//----------------
	/**
	 * ID in the database, this id is related to the _id column
	 * of the table, and this is automatically autoincremented
	 */
	private int id;
	
	/**
	 * The username must respect the email format (this validation is done
	 * in the graphica user interface)
	 */
	private String username;
	
	/**
	 * The password of the username
	 * TODO save it with hash format in the database
	 */
	private String password;
	
	/**
	 * This attribute saves the accummulated score of the user that is being
	 * playing in the system
	 */
	private int totalScore;
	
	//TODO do we need to put the list of played games?
	//----------------
	//CONSTRUCTOR
	//----------------
	/**
	 * Empty constructor
	 */
	public User(){}
	
	/**
	 * @param id: The id assigned by the android framework when the row is created
	 * @param username
	 * @param password
	 */
	public User(int id, String username, String password)
	{
		this.id= id;
		this.username= username;
		this.password = password;
		totalScore = 0;
	}
	//-------------------
	//GETTERS AND SETTERS
	//-------------------
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * @return the totalScore
	 */
	public int getTotalScore() {
		return totalScore;
	}
	/**
	 * @param totalScore the totalScore to set
	 */
	public void setTotalScore(int totalScore) {
		this.totalScore = totalScore;
	}

	
	
}
